package com.perceptivesoftware.security;

import java.util.ArrayList;
import java.util.List;
import org.springframework.ldap.core.DirContextOperations;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.ldap.userdetails.LdapAuthoritiesPopulator;

public class PerceptiveLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator
{

	@Override
	public List<GrantedAuthority> getGrantedAuthorities(DirContextOperations userData, String username)
	{
    	final List<GrantedAuthority> ga = new ArrayList<GrantedAuthority>();
    	ga.add(new SimpleGrantedAuthority("ROLE_USER"));
    	return ga;
	}

}